<?php
html::printPath(
    array('userSpace.account-display-header' => '/user/myAccount/display', 'userSpace.account-edit-header' => ''),
    'userSpace.account-edit-desc'
);
$msg->printMessages();

$fb = new FormBuilder('person', $person);
$fb->setAction('/user/myAccount/save');
// $fb->text('login')->readOnly();
$fb->spacer();
$fb->text('first_name')->required();
$fb->text('last_name')->required();
$fb->text('other_names')->hint();
$fb->text('title');
$fb->text('yoga_name');
$fb->radioButtons('gender', array('M','F'), 'person.gender-')->required();
$fb->date('birth_date')->required();

$fb->delimiter(text::get('person-idetificationPapers'));
$fb->description(text::get('person.weNeedIdCardNumber'));
$fb->comboBox('idcard_type', $idcardTypeOptions);
$fb->text('idcard_number');
$fb->comboBox('citizenship_code', $countryOptions)->hint()->required();

$fb->delimiter(text::get('person-permanentAddress'));
$fb->text('street');
$fb->text('city');
$fb->text('postal_code');
$fb->comboBox('country_code', $countryOptions)->required();

$fb->delimiter();
$fb->comboBox('country_of_residence_code', $countryOptions)->required();
$fb->comboBox('preferred_language', form::languageOptions())->noEmptyOption();

$fb->spacer();
$fb->text('telephone');
$fb->text('email')->required();

$fb->delimiter();
$fb->description(text::get('person-organization-info'));
$fb->comboBox('organization_id', $organizationOptions)->hint();

$fb->spacer();
$fb->button('submit', 'button.save');
$fb->write();
